<template>
	<div>
      <div class="main" ref="target" style="width: 600px; height: 250px;"></div>
	</div>
</template>

<script setup>
import echarts from "echarts";
import {onMounted,ref} from 'vue'

  const target=ref(null)
  let myChart
onMounted(()=>{
  myChart = echarts.init(target.value,"light");
  renderChart()
})

 const renderChart=()=>{
	 var options = {
    title: {
      text: ''
    },
    tooltip: {},

    legend: {
      data: ['到课'],
	  left:30,

    },
	color:['#96D6FF'],
    series: [{
      name: '考勤分析',
	  radius:'60%',
      type: 'pie',
      data: [
        {value:147, name: '到课'},
      ]
    }]
  };

  // Set chart options
  myChart.setOption(options);
 }

  </script>